// Default Blue Theme for PCMod

THEME.ThemeName = "DefaultRed"
THEME.NiceName = "Standard Red Theme"
THEME.Author = "[GU]|ZLC|thomasfn"

THEME.ProgramColour = Color( 50, 50, 50, 255 )

THEME.MainColour = Color( 255, 0, 0, 255 )

THEME.StartMenu.MainColour = Color( 255, 0, 0, 255 )
THEME.StartMenu.SecondaryColour = Color( 255, 255, 255, 200 )
THEME.StartMenu.TextColour = THEME.StartMenu.SecondaryColour

function THEME:Initialize()
	// Load all our textures
	Texs.DR_GButton = surface.GetTextureID( "vgui/glossywhite" )
	Texs.DR_GButtonLeft = surface.GetTextureID( "vgui/glossywhite-left" )
	Texs.DR_GButtonRight = surface.GetTextureID( "vgui/glossywhite-right" )
	Texs.DR_GButtonMiddle = surface.GetTextureID( "vgui/glossywhite-middle" )
end

function THEME:DrawButton( x, y, w, h, depressed )
	if (w > 32) then
		// Set Colour
		surface.SetDrawColor( 255, 0, 0, 255 )
		
		// Left Section
		surface.SetTexture( Texs.DR_GButtonLeft )
		surface.DrawTexturedRect( x, y, 16, h )
		
		// Right Section
		surface.SetTexture( Texs.DR_GButtonRight )
		surface.DrawTexturedRect( x+(w-16), y, 16, h )
		
		// Middle Section
		surface.SetTexture( Texs.DR_GButtonMiddle )
		surface.DrawTexturedRect( x+16, y, w-32, h )
	else
		// Whole Button
		surface.SetTexture( Texs.DR_GButton )
		surface.SetDrawColor( 255, 0, 0, 255 )
		surface.DrawTexturedRect( x, y, w, h )
	end
	
	// Clicked Overlay
	if (depressed) then
		surface.SetDrawColor( 200, 200, 200, 128 )
		surface.DrawRect( x, y, w, h )
	end
end

function THEME:DrawProgramButton( x, y, w, h, hovered, depressed, text )
	// Colour
	local col = Color( 255, 255, 255, 255 )
	if (hovered) then col = Color( 255, 200, 200, 255 ) end
	if (depressed) then col = Color( 255, 150, 150, 255 ) end
	
	// Box
	surface.SetDrawColor( col )
	surface.DrawRect( x, y, w, h )
	surface.SetDrawColor( 0, 0, 0, 255 )
	
	// (In Order) Top Line, Bottom Line, Left Line, Right Line
	surface.DrawLine( x, y, x+w, y )
	surface.DrawLine( x, y+h-1, x+w, y+h-1 )
	surface.DrawLine( x, y, x, h )
	surface.DrawLine( x+(w-2), y, x+(w-2), y+h )
	
	// Text
	draw.SimpleText( text, "PCText", x+(w/2), y+(h/2), Color( 0, 0, 0, 255 ), 1, 1 )
end

function THEME:DrawProgramBar( x, y, w, h, text )
	surface.SetDrawColor( self.MainColour )
	surface.DrawRect( x, y, w, h )
	draw.SimpleText( text, "PCText", x+22, y+2, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
end

function THEME:DrawLowerBar( x, y, w, h )
	surface.SetDrawColor( 255, 0, 0, 255 )
	surface.SetTexture( Texs.DR_LBRight )
	surface.DrawTexturedRect( x, y, w, h )
end

function THEME:DrawBackground( x, y, w, h )
	surface.SetDrawColor( 50, 50, 50, 255 )
	surface.DrawRect( x, y, w, h )
end

function THEME:DrawStartButton( x, y, w, h, depressed )
	self:DrawButton( x, y, w, h, depressed )
	draw.SimpleText( "Start", "PCText", x+(w/2), y+(h/2), Color( 255, 255, 255, 255 ), 1, 1 )
end

function THEME:DrawDesktopIcon( x, y, w, h, depressed, prog )
	local col = Color( 50, 50, 50, 200 )
	if (depressed) then col = Color( 100, 100, 100, 200 ) end
	draw.RoundedBox( 8, x, y, w, h, col )
	local ico = prog.Icon
	if (!ico) then ico = "icons/ico_app" end
	local st = pc_geticon( "vgui/" .. ico )
	surface.SetTexture( st )
	surface.SetDrawColor( 255, 255, 255, 255 )
	surface.DrawTexturedRect( x+(w*0.15), y+(h*0.1), w*0.7, h*0.7 )
	local nm = prog.NiceName
	if (!nm) then nm = "Unknown" end
	draw.SimpleText( nm, "PCText", x+(w/2), y+(h*0.9), Color( 255, 255, 255, 255 ), 1, 1 )
end